package com.ce.pms.log4ce;

import java.util.Map;

import org.aspectj.lang.JoinPoint;

import com.ce.component.log4ce.aop.constructor.support.AbstractBizDescriptionHandler;
import com.ce.component.log4ce.aop.constructor.support.BizDescriptionHandler;
import com.ce.component.log4ce.aop.parser.BizLogParser;
import com.ce.pms.customer.vo.MemberVO;

public class MemberAddHandler extends AbstractBizDescriptionHandler implements BizDescriptionHandler
{
	private Log4ceHelper log4ceHelper = Log4ceHelper.getInstance();
	@Override
	public Map<String, Object> getNamedParametersMap(JoinPoint joinPoint, Object obj, BizLogParser logParser) {


		Map<String,Object> map = logParser.getLogArguments(joinPoint);
		MemberVO memberVO = (MemberVO)map.get("membervo");
		String houseNumber = log4ceHelper.getHouseNumber(memberVO.getHouseId());
		map.put("houseNumber", houseNumber);
		map.put("customerName", log4ceHelper.getCustomerName(memberVO.getOwnerId()));
		map.put("participantName", memberVO.getParticipantName());
		map.put("ID_type", memberVO.getID_type());
		map.put("idNumber", memberVO.getCertificateNo());
		map.put("telephone", memberVO.getTelephone());
		map.putAll(logParser.getLogStaticContents(joinPoint));
		return map;
	}
}
